package com.scedu.service.impl;

import com.scedu.dao.UserDao;
import com.scedu.dao.impl.UserDaoImpl;
import com.scedu.dao.impl.UserDaoMysqlImpl;
import com.scedu.service.UserService;
/*
业务层的实现类
 */
public class UserServiceImpl implements UserService {
    //private UserDao userDao=new UserDaoImpl();
    //修改业务层的代码改用UserDaoMysqlImpl
    //private UserDao userDao=new UserDaoMysqlImpl();
    //利用set方法动态实现值的注入
    private UserDao userDao;
//    public void setUserDao(UserDao userDao){
//        this.userDao=userDao;
//    }

    public UserServiceImpl(UserDao userDao) {
        this.userDao = userDao;
    }

    public void getUser() {
        userDao.getUser();
    }
}
